<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      BlueZ-5.53
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-9.1">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 9.1
      </h4>
      <h3>
        Chapter&nbsp;12.&nbsp;System Utilities
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="autofs.html" title="autofs-5.1.6">Prev</a>
          <p>
            autofs-5.1.6
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="bubblewrap.html" title=
          "Bubblewrap-0.4.0">Next</a>
          <p>
            Bubblewrap-0.4.0
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="sysutils.html" title=
          "Chapter&nbsp;12.&nbsp;System Utilities">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="bluez" name="bluez"></a>BlueZ-5.53
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to BlueZ
        </h2>
        <p>
          The <span class="application">BlueZ</span> package contains the
          Bluetooth protocol stack for Linux.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://www.kernel.org/pub/linux/bluetooth/bluez-5.53.tar.xz">
                https://www.kernel.org/pub/linux/bluetooth/bluez-5.53.tar.xz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: 85b14abb138948f50b1650aa866cb019
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 1.9 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 67 MB (add 77 MB for tests)
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.2 SBU (using parallelism=4; add 0.2
                SBU for tests)
              </p>
            </li>
          </ul>
        </div>
        <h3>
          BlueZ Dependencies
        </h3>
        <h4>
          Required
        </h4>
        <p class="required">
          <a class="xref" href="dbus.html" title=
          "dbus-1.12.16">dbus-1.12.16</a>, <a class="xref" href="glib2.html"
          title="GLib-2.62.4">GLib-2.62.4</a>, and <a class="xref" href=
          "libical.html" title="libical-3.0.7">libical-3.0.7</a>
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/bluez">http://wiki.linuxfromscratch.org/blfs/wiki/bluez</a>
        </p>
      </div>
      <div class="kernel" lang="en" xml:lang="en">
        <h2 class="sect2">
          <a id="bluez-kernel" name="bluez-kernel"></a>Kernel Configuration
        </h2>
        <p>
          If you are building this package to use bluetooth devices (rather
          than as a build dependency), enable the following options in the
          kernel configuration, also the options below the next paragraph if
          you intend to run the tests, and recompile the kernel if necessary:
        </p>
        <pre class="screen">
<code class=
"literal">[*] Networking support ---&gt;                [CONFIG_NET]
  &lt;/M&gt; Bluetooth subsystem support ---&gt;    [CONFIG_BT]
    &lt;*/M&gt; RFCOMM protocol support          [CONFIG_BT_RFCOMM]
    [*]   RFCOMM TTY support               [CONFIG_BT_RFCOMM_TTY]
    &lt;*/M&gt; BNEP protocol support            [CONFIG_BT_BNEP]
    [*]   Multicast filter support         [CONFIG_BT_BNEP_MC_FILTER]
    [*]   Protocol filter support          [CONFIG_BT_BNEP_PROTO_FILTER]
    &lt;*/M&gt; HIDP protocol support            [CONFIG_BT_HIDP]
        Bluetooth device drivers ---&gt;
          (Select the appropriate drivers for your Bluetooth hardware)

  &lt;*/M&gt; RF switch subsystem support ---&gt;   [CONFIG_RFKILL]</code>
</pre>
        <p>
          If you wish to run the testsuite (even if treating this package as
          a build dependency), you will need to enable the following options
          in the kernel configuration and recompile the kernel if necessary:
        </p>
        <pre class="screen">
<code class=
"literal">[*] Networking support ---&gt;                                     [CONFIG_NET]
-*- Cryptographic API ---&gt;                                      [CONFIG_CRYPTO]
  &lt;/M&gt; User-space interface for hash algorithms                 [CONFIG_CRYPTO_USER_API_HASH]
  &lt;/M&gt; User-space interface for symmetric key cipher algorithms [CONFIG_CRYPTO_USER_API_SKCIPHER]</code>
</pre>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of BlueZ
        </h2>
        <p>
          Install <span class="application">BlueZ</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class="command">./configure --prefix=/usr         \
            --sysconfdir=/etc     \
            --localstatedir=/var  \
            --enable-library      \
            --disable-systemd     &amp;&amp;
make</kbd>
</pre>
        <p>
          To test the results, issue: <strong class="userinput"><code>make
          check</code></strong>.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install &amp;&amp;
ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin</kbd>
</pre>
        <p>
          Install the main configuration file as the <code class=
          "systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">install -v -dm755 /etc/bluetooth &amp;&amp;
install -v -m644 src/main.conf /etc/bluetooth/main.conf</kbd>
</pre>
        <p>
          If desired, install the API documentation as the <code class=
          "systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">install -v -dm755 /usr/share/doc/bluez-5.53 &amp;&amp;
install -v -m644 doc/*.txt /usr/share/doc/bluez-5.53</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <em class="parameter"><code>--enable-library</code></em>: This
          switch enables building the <span class="application">BlueZ</span>
          4 compatibility library which is required by some applications.
        </p>
        <p>
          <em class="parameter"><code>--disable-systemd</code></em>: This
          switch is needed because <span class="application">systemd</span>
          is not part of LFS/BLFS. If you are using systemd, remove this
          switch.
        </p>
        <p>
          <span class="command"><strong>ln -svf
          ../libexec/bluetooth/bluetoothd /usr/sbin</strong></span>: This
          command makes access to the bluetooth daemon more convenient.
        </p>
      </div>
      <div class="configuration" lang="en" xml:lang="en">
        <h2 class="sect2">
          Configuring BlueZ
        </h2>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3">
            <a id="bluez-config" name="bluez-config"></a>
          </h3>
          <h4 class="title">
            <a id="bluez-config" name="bluez-config"></a>Configuration Files
          </h4>
          <p>
            <code class="filename">/etc/bluetooth/main.conf</code> is
            installed automatically during the install. Additionally, there
            are three supplementary configuration files.
            /etc/sysconfig/bluetooth is installed as a part of the boot
            script below. In addition, you optionally can install the
            following, as the <code class="systemitem">root</code> user:
          </p>
          <pre class="root">
<kbd class="command">cat &gt; /etc/bluetooth/rfcomm.conf &lt;&lt; "EOF"</kbd>
<code class="literal"># Start rfcomm.conf
# Set up the RFCOMM configuration of the Bluetooth subsystem in the Linux kernel.
# Use one line per command
# See the rfcomm man page for options


# End of rfcomm.conf</code>
EOF
</pre>
          <pre class="root">
<kbd class="command">cat &gt; /etc/bluetooth/uart.conf &lt;&lt; "EOF"</kbd>
<code class="literal"># Start uart.conf
# Attach serial devices via UART HCI to BlueZ stack
# Use one line per device
# See the hciattach man page for options

# End of uart.conf</code>
EOF
</pre>
        </div>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3">
            <a id="bluez-init" name="bluez-init"></a>
          </h3>
          <h4 class="title">
            <a id="bluez-init" name="bluez-init"></a><span class=
            "phrase">Boot Script</span>
          </h4>
          <p>
            To automatically start the <span class=
            "command"><strong>bluetoothd</strong></span> daemon when the
            system is rebooted, install the <code class=
            "filename">/etc/rc.d/init.d/bluetooth</code> bootscript from the
            <a class="xref" href="../introduction/bootscripts.html" title=
            "BLFS Boot Scripts">blfs-bootscripts-20191204</a> package.
          </p>
          <pre class="root">
<kbd class="command">make install-bluetooth</kbd>
</pre>
        </div>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">bccmd, bluemoon, bluetoothctl, bluetoothd
              (symlink), btattach, btmon, hex2hcd, l2ping, l2test,
              mpris-proxy, and rctest</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Library:</strong>
              <span class="segbody">libbluetooth.so</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">/etc/bluetooth,
              /usr/{include,libexec}/bluetooth, and
              /usr/share/doc/bluez-5.53</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="bccmd" name="bccmd"></a><span class=
                    "term"><span class=
                    "command"><strong>bccmd</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used to issue BlueCore commands to Cambridge Silicon
                    Radio devices.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="bluemoon" name="bluemoon"></a><span class=
                    "term"><span class=
                    "command"><strong>bluemoon</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a Bluemoon configuration utility.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="bluetoothctl" name="bluetoothctl"></a><span class=
                    "term"><span class=
                    "command"><strong>bluetoothctl</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is the interactive Bluetooth control program.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="bluetoothd" name="bluetoothd"></a><span class=
                    "term"><span class=
                    "command"><strong>bluetoothd</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is the Bluetooth daemon.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="btmon" name="btmon"></a><span class=
                    "term"><span class=
                    "command"><strong>btmon</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    provides access to the Bluetooth subsystem monitor
                    infrastructure for reading HCI traces.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="hex2hcd" name="hex2hcd"></a><span class=
                    "term"><span class=
                    "command"><strong>hex2hcd</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used to convert a file needed by Broadcom devices to
                    hcd (Broadcom bluetooth firmware) format.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="l2ping" name="l2ping"></a><span class=
                    "term"><span class=
                    "command"><strong>l2ping</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used to send a L2CAP echo request to the Bluetooth MAC
                    address given in dotted hex notation.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="l2test" name="l2test"></a><span class=
                    "term"><span class=
                    "command"><strong>l2test</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a L2CAP testing program.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="rctest" name="rctest"></a><span class=
                    "term"><span class=
                    "command"><strong>rctest</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used to test RFCOMM communications on the Bluetooth
                    stack.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libbluetooth" name="libbluetooth"></a><span class=
                    "term"><code class=
                    "filename">libbluetooth.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains the <span class="application">BlueZ</span> 4 API
                    functions.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-02-16 15:15:05 -0800
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="autofs.html" title="autofs-5.1.6">Prev</a>
          <p>
            autofs-5.1.6
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="bubblewrap.html" title=
          "Bubblewrap-0.4.0">Next</a>
          <p>
            Bubblewrap-0.4.0
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="sysutils.html" title=
          "Chapter&nbsp;12.&nbsp;System Utilities">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
